package com.yztc.orangeentertainment.ui.main.subscribefragment.staritem.starwishfragment;

import android.content.Context;

import com.yztc.orangeentertainment.bean.staritembean.WishListBean;
import com.yztc.orangeentertainment.config.SubscribeUrlConfig;

import java.util.List;
import java.util.Map;

/**
 * Created by My on 2016/10/8.
 */
public class WishPresenter implements WishContract.Presenter {
    private WishContract.View view;
    private WishModle modle;

    public WishPresenter(WishContract.View view) {
        this.view = view;
        modle=new WishModle();
    }

    @Override
    public void getWishFromNet(Map<String, String> params, Context context) {
        modle.getWishAll(SubscribeUrlConfig.PATH.URL_WISH_TYPE, params, new OnLoadWishListener() {
            @Override
            public void onSuccess(List<WishListBean> list) {
                view.getWishSuccess(list);
            }

            @Override
            public void onFailure(Exception e) {

            }
        });
    }
}
